package demo3;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LinkMan {

    private String name;
    private int age;
    private String menger;
    private String phoneNum;

    @Override
    public boolean equals(Object o) {

        LinkMan linkMan = (LinkMan) o;
        return phoneNum.equals(linkMan.getPhoneNum());
    }

    @Override
    public int hashCode() {
        return phoneNum.hashCode();
    }
}
